﻿using Microsoft.Extensions.Logging;
using NLog;
using NLog.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp
{
    internal class msLogging
    {
        
        static void Main6(string[] args)
        {
            //LogManager.LoadConfiguration("nlog.config");
            LogManager.Setup().LoadConfigurationFromFile("nlog.config");

            var loggerFactory = LoggerFactory.Create(builder =>
            {
                builder.AddNLog();
            });

            var logger = loggerFactory.CreateLogger<msLogging>();

            logger.LogTrace("This is a Trace message");
            logger.LogDebug("This is a Debug message");
            logger.LogInformation("This is an Information message");
            logger.LogWarning("This is a Warning message");
            logger.LogError("This is an Error message");
            logger.LogCritical("This is a Critical message");

            LogManager.Shutdown();
        }

    }
}
